| 7.1 In the SinglyLinkedList class, define the following method without using an iterator. /** * Finds the element at a specified position in this LinkedList object. * The worstTime(n) is O(n). * * @param index - the position of the element to be returned. * * @return the element at position index. * * @throws IndexOutOfBoundsException - if index is less than 0 or greater than * or equal to size(). */ public E get (int index) | |
| View Solution | |
| Next >> | |